
public class Message {
    public int type;
    public int length;
    public byte[] data;

    Message(int type, byte[] data, int length)
    {
        this.type = type;
        this.length = length;
        this.data = new byte[length];
        
        for (int i = 0; i < length; ++i)
            this.data[i] = data[i];
    }
    
    public final static int TEXT = 0;
    public final static int SOUND = 1;
}
